<!DOCTYPE html>
<!--是Thyme leaf 命名空间，通过引入该命名空间就可以在HTML 文件中使用Thymeleaf 标签语言，用关键字“ th ” 来标注。-->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>springboot-thymeleaf demo page</title>
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <script th:src="@{/layui/layui.js}"></script>
    <link rel="stylesheet" th:href="@{/project/css/hello.css}">
</head>
<body>
    <div class="div">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">输入框</label>
                <div class="layui-input-block">
                    <input type="text" name="title" required  lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">密码框</label>
                <div class="layui-input-inline">
                    <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">辅助文字</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">选择框</label>
                <div class="layui-input-block">
                    <select name="city" lay-verify="required">
                        <option value=""></option>
                        <option value="0">北京</option>
                        <option value="1">上海</option>
                        <option value="2">广州</option>
                        <option value="3">深圳</option>
                        <option value="4">杭州</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">复选框</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="like[write]" title="写作">
                    <input type="checkbox" name="like[read]" title="阅读" checked>
                    <input type="checkbox" name="like[dai]" title="发呆">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">开关</label>
                <div class="layui-input-block">
                    <input type="checkbox" name="switch" lay-skin="switch">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">单选框</label>
                <div class="layui-input-block">
                    <input type="radio" name="sex" value="男" title="男">
                    <input type="radio" name="sex" value="女" title="女" checked>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">文本域</label>
                <div class="layui-input-block">
                    <textarea name="desc" placeholder="请输入内容" class="layui-textarea"></textarea>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
    <!--<div style="width: 800px; margin: 20px auto;">-->
        <!--<form class="layui-form" action="">-->
            <!--<div class="layui-form-item">-->
                <!--<label class="layui-form-label">id</label>-->
                <!--<div class="layui-input-block">-->
                    <!--<input type="text" name="id" required  lay-verify="required" placeholder="请输入编号" autocomplete="off" class="layui-input">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="layui-form-item">-->
                <!--<label class="layui-form-label">姓名</label>-->
                <!--<div class="layui-input-block">-->
                    <!--<input type="text" name="username" required  lay-verify="required" placeholder="请输入姓名" autocomplete="off" class="layui-input">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="layui-form-item">-->
                <!--<label class="layui-form-label">地址</label>-->
                <!--<div class="layui-input-block">-->
                    <!--<input type="text" name="address" required  lay-verify="required" placeholder="请输入地址" autocomplete="off" class="layui-input">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="layui-form-item">-->
                <!--<label class="layui-form-label">状态</label>-->
                <!--<div class="layui-input-block">-->
                    <!--<input type="text" name="state" required  lay-verify="required" placeholder="请输入状态" autocomplete="off" class="layui-input">-->
                <!--</div>-->
            <!--</div>-->
            <!--<div class="layui-form-item">-->
                <!--<div class="layui-input-block">-->
                    <!--<button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>-->
                    <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</form>-->
    <!--</div>-->
</body>
<script th:src="@{/project/js/hello.js}"></script>
<!--<script>-->
    <!--layui.use(['form', 'jquery'], function () {-->
        <!--var form = layui.form,-->
            <!--$ = layui.jquery;-->
        <!--//监听提交-->
        <!--form.on('submit(formDemo)', function (data) {-->
            <!--$.ajax({-->
                <!--type: "post",// 提交表单的方法-->
                <!--url: "/employee/save2",// 对应登陆接口的路径-->
                <!--data: JSON.stringify(data.field),// 提交的数据-->
                <!--dataType: "json",// 服务端返回的数据类型-->
                <!--contentType: 'application/json;charset=UTF-8',//不可缺少-->
                <!--success: function (data) {// 服务器返回数据之后的回调函数-->
                    <!--layer.msg(data.address)-->
                <!--}-->
            <!--});-->
            <!--return false;-->
        <!--});-->

        <!--form.render();-->
    <!--});-->
<!--</script>-->
</html>
